package app.model.login;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name="login_user")
public class LoginUser implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String id;
	private String userName;
	private String password;
	private String safeQue;
	private String safeAns;
	private String remark;
	private Date createTime;
	private int isUse;

	public LoginUser() {
		super();
	}

	public LoginUser(String id, String userName, String password) {
		super();
		this.id = id;
		this.userName = userName;
		this.password = password;
	}

	@Id
	@Column(name="id", length=40, nullable=false)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	//注解于方法中 
    @Column(name="user_name", length=40, nullable=true) //较详细定义 
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name="password", length=40, nullable=true)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name="safe_que", nullable=true)
	public String getSafeQue() {
		return safeQue;
	}

	public void setSafeQue(String safeQue) {
		this.safeQue = safeQue;
	}

	@Column(name="safe_ans", nullable=true)
	public String getSafeAns() {
		return safeAns;
	}

	public void setSafeAns(String safeAns) {
		this.safeAns = safeAns;
	}

	@Column(name="remark", length=400, nullable=true,columnDefinition="String")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name="create_time", length=400, nullable=true)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name="is_use", length=1, nullable=true)
	public int getIsUse() {
		return isUse;
	}

	public void setIsUse(int isUse) {
		this.isUse = isUse;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + userName + ", password="
				+ password + "]";
	}
}